package com.ruoyi.insurance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.insurance.mapper.ThreatIncidentMapper;
import com.ruoyi.insurance.domain.ThreatIncident;
import com.ruoyi.insurance.service.IThreatIncidentService;

/**
 * 威胁事件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-10
 */
@Service
public class ThreatIncidentServiceImpl implements IThreatIncidentService 
{
    @Autowired
    private ThreatIncidentMapper threatIncidentMapper;

    /**
     * 查询威胁事件
     * 
     * @param threatId 威胁事件主键
     * @return 威胁事件
     */
    @Override
    public ThreatIncident selectThreatIncidentByThreatId(Long threatId)
    {
        return threatIncidentMapper.selectThreatIncidentByThreatId(threatId);
    }

    /**
     * 查询威胁事件列表
     * 
     * @param threatIncident 威胁事件
     * @return 威胁事件
     */
    @Override
    public List<ThreatIncident> selectThreatIncidentList(ThreatIncident threatIncident)
    {
        return threatIncidentMapper.selectThreatIncidentList(threatIncident);
    }

    /**
     * 新增威胁事件
     * 
     * @param threatIncident 威胁事件
     * @return 结果
     */
    @Override
    public int insertThreatIncident(ThreatIncident threatIncident)
    {
        return threatIncidentMapper.insertThreatIncident(threatIncident);
    }

    /**
     * 修改威胁事件
     * 
     * @param threatIncident 威胁事件
     * @return 结果
     */
    @Override
    public int updateThreatIncident(ThreatIncident threatIncident)
    {
        return threatIncidentMapper.updateThreatIncident(threatIncident);
    }

    /**
     * 批量删除威胁事件
     * 
     * @param threatIds 需要删除的威胁事件主键
     * @return 结果
     */
    @Override
    public int deleteThreatIncidentByThreatIds(Long[] threatIds)
    {
        return threatIncidentMapper.deleteThreatIncidentByThreatIds(threatIds);
    }

    /**
     * 删除威胁事件信息
     * 
     * @param threatId 威胁事件主键
     * @return 结果
     */
    @Override
    public int deleteThreatIncidentByThreatId(Long threatId)
    {
        return threatIncidentMapper.deleteThreatIncidentByThreatId(threatId);
    }
}
